Semantic Subtyping for Objects and Classes

نویسندگان

  • Ornela Dardha
  • Daniele Gorla
  • Daniele Varacca
چکیده

In this paper, we propose an integration of structural subtyping with boolean connectives and semantic subtyping to define a Java-like programming language that exploits the benefits of both techniques. Semantic subtyping is an approach for defining subtyping relation based on set-theoretic models, rather than syntactic rules. On the one hand, this approach involves some non-trivial mathematical machinery in the background. On the other hand, final users of the language need not know this machinery and the resulting subtyping relation is very powerful and intuitive. While semantic subtyping is naturally linked to the structural one, we show how our framework can also accommodate the nominal subtyping. Several examples show the expressivity and the practical advantages of our proposal.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Subtyping patterns for active objects

Subtyping relations for object-oriented formalisms describe relationships between superand subclasses which satisfy the substitutability requirement imposed on types and their subtypes. For active objects with an associated behaviour description subtyping relations also have to guarantee substitutability with respect to the dynamic behaviour of classes. In this paper, we give subtyping patterns...

متن کامل

From Classes to Objects via Subtyping

We extend the Abadi-Cardelli calculus of primitive objects with object extension. We enrich object types with a more precise, uniform, and exible type structure. This enables to type object extension under both width and depth subtyping. Objects may also have extend-only or virtual contra-variant methods and read-only co-variant methods. The resulting subtyping relation is richer, and types of ...

متن کامل

Semantic subtyping between coinductive mutable record types with unions and intersections

Semantic subtyping between coinductive record types supports accurate type analysis of object-oriented languages, by introducing Boolean type constructors and modeling cyclic objects. In previous work, a sound and complete algorithm for semantic subtyping has been proposed, but only for coinductive immutable record types with unions. In this work we address the issue of extending the previous r...

متن کامل

An Object Oriented Speci cation Language based on Hierarchical Algebraic Petri Nets

During the last few years there has been signiicant interest in combining the beneets of an object-oriented approach with Petri net formalism which is suitable to modelling and simulation of concurrent systems. Nevertheless, for modelling some system behaviour dynamic creation of new components is often needed. In this paper we introduce a formalism based on algebraic Petri nets using the objec...

متن کامل

Operational Subsumption, an Ideal Model of Subtyping

In a previous paper we have deened a semantic preorder called operational subsumption , which compares terms according to their error generation behaviour. Here we apply this abstract framework to a concrete language, namely the Abadi-Cardelli object calculus. Unlike most semantic studies of objects, which deal with typed equalities and therefore require explicitly typed languages, we start her...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Comput. J.

دوره 60  شماره 

صفحات  -

تاریخ انتشار 2013